const path =require('path')

const webpack =require('webpack')

const VueLoaderPlugin = require('vue-loader/lib/plugin');

module.exports={
     entry:path.join(__dirname,'./京东金融项目/main.js' ),
     output: {
         path: path.join(__dirname,'./dist'),
         filename:'bundle.js'
      },
    //  devServer:{     //
    //         open : true,
    //         contentBase:'src',
    //         hot:true    //启用热更新
    //  }
    //  ,
    //  plugins:[
    //      new webpack.HotModuleReplacemetPlugin()
    //  ]



    plugins: [
      // make sure to include the plugin for the magic
      new VueLoaderPlugin()   
      

       
    
       
  ],


    module:{   //配置css 
                     rules:[           //所有第三方匹配 模块的匹配规则
                 {test :  /\.css$/ ,use:['style-loader' ,'css-loader']},
                  {test :  /\.less$/ ,use:['style-loader' ,'css-loader','less-loader']},
                  {test :  /\.scss$/ ,use:['style-loader' ,'css-loader','sass-loader'] ,},
                          //{test :  /\.stylus$/ ,use:['style-loader' ,'css-loader','url-loader','stylus-loader']},
                          
                  {test :  /\.(jpg|png|gif|bmg|jpeg|)$/ ,use:'url-loader'},
                              //  {test :  /\.(eot|svg|ttf|woff|woff2)$/,use: ['file-loader' ] },
                  {test :  /\.(eot|svg|ttf|woff|woff2)$/ , use: ['file-loader'] }, //删除了'url-loader'  在使用mui的时候
                              //  {test :  /\.js$/ ,use:'babel-loader', exclude:/node_modules/ }
                  {test :  /\.vue$/ ,use:'vue-loader'} ,



                            

                        
                           ]                
           },
          //  resolve:{
          //    alias:{     //设置 VUE 被导入时候包的路径
          //      'vue$':"vue/dist/vue.js"
          //    }
          //  }
        




    }